package com.open.capacity.paper.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.open.capacity.common.exception.service.ServiceException;
import com.open.capacity.common.model.Paper;
import com.open.capacity.common.web.PageResult;
import com.open.capacity.common.web.Result;
import com.open.capacity.paper.vo.PaperVo;

import java.util.Map;

/**
 * @author liangd
 * @since 2021-02-01 14:37
 */
public interface PaperService extends IService<Paper> {
    /**
     * 分页查询
     *
     * @param params Map<String, Object>
     * @return PageResult
     */
    PageResult<PaperVo> getPapers(Map<String, Object> params) throws ServiceException;

    /**
     * 更新
     *
     * @param paper Paper
     * @return Result
     */
    Result updatePaper(Paper paper) throws ServiceException;

    /**
     * 插入
     *
     * @param paper Paper
     * @return Result
     */
    Result savePaper(Paper paper) throws ServiceException;

    /**
     * 逻辑删除
     *
     * @param papeid 问卷Id
     * @return Result
     */
    Result deletePaper(Integer papeid) throws ServiceException;
}
